#pragma once
#include "DataSource.h"
#include <string>
#include "HttpClient.h"

char* UnicodeToUTF8(const char* mbcsStr);

class HttpDataSource:public DataSource
{
public:
	HttpDataSource(HttpClient* pHttpClient);
	virtual ~HttpDataSource(void);
	void SetStatusURL(std::string url);
	void SetSlotsURL(std::string url);
	void SetAdListURL(std::string url);
	virtual int GetStatusJson(char byteBuffe[],int& bufferSize);
	virtual int GetSlotsJson(char byteBuffer[],int& bufferSize);
	virtual int GetAdListJson(int soltId,int maxResultCount,char byteBuffer[],int& bufferSize) ;
	void SetAreaCode(std::string csAreaCode);
	void SetType(int csType);

private:
	std::string m_strStatusURL;
	std::string m_strSlotsURL;
	std::string m_strAdListURL;
	HttpClient* m_pHttpClient;

	std::string m_sAreaCode;
	int m_type ;
};
